// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue';
import App from './App';
import router from './router';
import store from './store';
import BusinessTaskQueue from './tool/queue';
Vue.config.productionTip = false;

import VueBus from 'vue-bus';

Vue.use(VueBus);

Vue.prototype.$task = new BusinessTaskQueue(); //队列

import moment from 'moment';
Vue.prototype.$moment = moment; //时间转换
/*引入全局css*/
import '../static/css/main.css';

/* use iview*/
import iView from 'iview';
import 'iview/dist/styles/iview.css';
Vue.use(iView);

/*全局加载axios拦截器---配置axios的原型链*/
import './axios/axios';

import i18n from '../static/lang/i18n';

// import * as Sentry from '@sentry/vue';
// import { Integrations } from '@sentry/tracing';
// import SentryRRWeb from '@sentry/rrweb';

Vue.use(iView, {
	i18n: (key, value) => i18n.t(key, value)
});

// Sentry.init({
// 	Vue,
// 	dsn: 'https://d20a2952d1ab416d88ec978f42a2fc27@o1036954.ingest.sentry.io/6004632',
// 	integrations: [
// 		new Integrations.BrowserTracing({
// 			routingInstrumentation: Sentry.vueRouterInstrumentation(router),
// 			tracingOrigins: ['localhost:8081', 'localhost:8080', 'ivcs-showcase.zealcomm.cn', 'ivcs-dev.zealcomm.cn', 'ivcs-test.zealcomm.cn', /^\//]
// 		}),
// 		new SentryRRWeb({
// 			// default is empty
// 			checkoutEveryNth: 100,
// 			// default is 5 minutes
// 			checkoutEveryNms: 15 * 60 * 1000,
// 			// on by default
// 			maskAllInputs: false
// 		})
// 	],
// 	// Set tracesSampleRate to 1.0 to capture 100%
// 	// of transactions for performance monitoring.
// 	// We recommend adjusting this value in production
// 	tracesSampleRate: 1.0
// });

// Sentry.setTag('rrweb.active', 'yes');

/* eslint-disable no-new */
new Vue({
	el: '#app',
	router,
	store,
	i18n,
	components: {
		App
	},
	template: '<App/>'
});
